Efficient random sampling of binary and unary-binary trees via holonomic equations
نویسندگان
چکیده
منابع مشابه
Efficient random sampling of binary and unary-binary trees via holonomic equations
We present a new uniform random sampler for binary trees with n internal nodes consuming 2n + Θ(log(n)) random bits on average. This makes it quasi-optimal and out-performs the classical Remy algorithm. We also present a sampler for unary-binary trees with n nodes taking Θ(n) random bits on average. Both are the first linear-time algorithms to be optimal up to a constant.
متن کاملProfile and Height of Random Binary Search Trees
The purpose of this article is to survey recent results on distributional properties of random binary search trees. In particular we consider the profile and the height.
متن کاملRegister Allocation for Unary-Binary Trees
We study the number of registers required for evaluating arithmetic expressions formed with any set of unary and binary operators. Our approach consists in a singularity analysis of intervening generating functions combined with a use of (complex) Mellin inversion. We illustrate it first by rederiving the known results about binary trees and then extend it to the fully general case of unaj-bina...
متن کاملOn Random Binary Trees
A widely used class of binary trees is studied in order to provide information useful in evaluating algorithms based on this storage structure. A closed form counting formula for the number of binary trees with n nodes and height k is developed and restated as a recursion more useful computationally . A generating function for the number of nodes given height is developed and used to find the a...
متن کاملGenerating Binary Trees at Random
Atkinson, M.D. and J.-R. Sack, Generating binary trees at random, Information Processing Letters 41 (1992) 21-23. We give a new constructive proof of the Chung-Feller theorem. Our proof provides a new and simple linear-time algorithm for generating random binary trees on n nodes; the algorithm uses integers no larger than 212.
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
ژورنال
عنوان ژورنال: Theoretical Computer Science
سال: 2017
ISSN: 0304-3975
DOI: 10.1016/j.tcs.2017.07.009